<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>

<div class="header">
  <div id="logo">
    <img src="<c:url value="/resources/images/logo.png" />" class="logo-img"/>
    <span>Liyu's Blog</span>
  </div>
  
  <ul class="menu">
    
    <li class="menu-tab1 <c:if test="${homeTab}">active</c:if>">
      <div class="nav-tab nt1">
        <a href="<c:url value="/home"/>">Home</a>
      </div>
    </li>
    
    <li class="menu-tab2 <c:if test="${blogTab}">active</c:if>">
      <div class="nav-tab nt2">
        <a href="<c:url value="/blogs"/>">Blog</a>
      </div>
    </li>
    
    <li class="menu-tab3 <c:if test="${aboutTab}">active</c:if>">
      <div class="nav-tab nt3">
        <a href="<c:url value="/about"/>">About</a>
      </div>  
    </li>
  </ul>
  
  <security:authorize ifAllGranted="ROLE_ADMIN">
    <div class="admin-link">
      <a href="<c:url value="/admin"/>">Admin Console</a>
    </div>
  </security:authorize>
</div>
